package com.zhonghui.wms.service.impl;

import com.zhonghui.wms.domain.WmsInventoryDetails;
import com.zhonghui.wms.domain.vo.WmsInventoryDetailsVo;
import com.zhonghui.wms.mapper.WmsInventoryDetailsMapper;
import com.zhonghui.wms.service.IWmsInventoryDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 库存明细Service业务层处理
 *
 * @author zhonghui
 * @date 2022-05-27
 */
@Service
public class WmsInventoryDetailsServiceImpl implements IWmsInventoryDetailsService
{
    @Autowired
    private WmsInventoryDetailsMapper wmsInventoryDetailsMapper;

    /**
     * 查询库存明细
     *
     * @param id 库存明细主键
     * @return 库存明细
     */
    @Override
    public WmsInventoryDetails selectWmsInventoryDetailsById(Long id)
    {
        return wmsInventoryDetailsMapper.selectWmsInventoryDetailsById(id);
    }

    /**
     * 查询库存明细列表
     *
     * @param wmsInventoryDetailsVo 库存明细
     * @return 库存明细
     */
    @Override
    public List<WmsInventoryDetailsVo> selectWmsInventoryDetailsList(WmsInventoryDetailsVo wmsInventoryDetailsVo)
    {
        return wmsInventoryDetailsMapper.selectWmsInventoryDetailsList(wmsInventoryDetailsVo);
    }

    /**
     * 新增库存明细
     *
     * @param wmsInventoryDetailsVo 库存明细
     * @return 结果
     */
    @Override
    public int insertWmsInventoryDetails(WmsInventoryDetailsVo wmsInventoryDetailsVo)
    {
        return wmsInventoryDetailsMapper.insertWmsInventoryDetails(wmsInventoryDetailsVo);
    }

    /**
     * 修改库存明细
     *
     * @param wmsInventoryDetailsVo 库存明细
     * @return 结果
     */
    @Override
    public int updateWmsInventoryDetails(WmsInventoryDetailsVo wmsInventoryDetailsVo)
    {
        return wmsInventoryDetailsMapper.updateWmsInventoryDetails(wmsInventoryDetailsVo);
    }

    /**
     * 批量删除库存明细
     *
     * @param ids 需要删除的库存明细主键
     * @return 结果
     */
    @Override
    public int deleteWmsInventoryDetailsByIds(Long[] ids)
    {
        return wmsInventoryDetailsMapper.deleteWmsInventoryDetailsByIds(ids);
    }

    /**
     * 删除库存明细信息
     *
     * @param id 库存明细主键
     * @return 结果
     */
    @Override
    public int deleteWmsInventoryDetailsById(Long id)
    {
        return wmsInventoryDetailsMapper.deleteWmsInventoryDetailsById(id);
    }
}
